<template>
    <div>
      <el-table
      :data="ExamHistroy">
        <el-table-column type="index" label="#"></el-table-column>
        <el-table-column prop="paperId" label="试卷ID"></el-table-column>
        <el-table-column prop="userId" label="用户ID"></el-table-column>
        <el-table-column prop="examDate" label="考试时间"></el-table-column>
        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button 
            type="primary" 
            @click="$router.push({name: 'answer',params: {paperId:scope.row['paperId']}})">再来一次</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
</template>
<script>
import { getExamHistory } from "@/api/exam"

export default{
    name: '',
    data(){
        return {
          ExamHistroy:[]
        }
    },
    methods:{
        
    },
    mounted(){
        getExamHistory().then(res => {
          this.ExamHistroy = res.data;
        })
    }
}
</script>
<style scoped>

</style>